<script type="text/javascript" src="/FCKeditor/fckeditor.js"></script>
<%= error_messages_for 'content' %>

<!--[form:content]-->
<p><label for="content_title">Title</label><br/>
<%= text_field 'content', 'title'  %></p>

<p><label for="content_title_short">Title short</label><br/>
<%= text_field 'content', 'title_short'  %></p>

<script type="text/javascript">
	window.onload = function()
	{
		var oFCKeditor = new FCKeditor('content_text');
		oFCKeditor.Height = 400 ;
		oFCKeditor.ReplaceTextarea();
	}
</script>
<p>
<textarea id="content_text" name="content[text]" height="800"><%= @content.text %>
</textarea>	
</p>

<p><label for="content_published">Published</label><br/>
<select id="content_published" name="content[published]"><option value="false">False</option><option value="true">True</option></select></p>

<p><label for="content_front_page">Front page</label><br/>
<select id="content_front_page" name="content[front_page]"><option value="false">False</option><option value="true">True</option></select></p>

<p><label for="content_order">Order</label><br/>
<%= text_field 'content', 'order'  %></p>

<p><label for="content_section">Section</label><br/>
<% @sections = Section.find(:all).map {|s| [s.title, s.title]} %>
<%= select(:content, :section, @sections) %></p>


<p><label for="content_category">Category</label><br/>
<% @categories = Category.find(:all).map {|c| [c.title, c.title]} %>
<%= select(:content, :category, @categories) %></p>

<p><label for="content_author">Author</label><br/>
<%= text_field 'content', 'author'  %></p>

<p><label for="content_create_date">Create date</label><br/>
<%= date_select 'content', 'create_date'  %></p>

<p><label for="content_update_date">Update date</label><br/>
<%= date_select 'content', 'update_date'  %></p>
<!--[eoform:content]-->

